from pydantic import BaseModel, Field
import typing as T
from datetime import date, datetime


class OperateLog(BaseModel):
    """
    操作日志的相关模型
    """

    id: int | None = Field(default=None, description="主键")
    className: str = Field(default=None, description="文件路径用.分割")
    methodName: str = Field(default=None, description="方法名")
    methodParams: str = Field(default=None, description="方法参数")
    operateTime: datetime = Field(
        default_factory=datetime.now,
        description="操作时间",
    )
    operateUser: int = Field(default=None, description="操作人id")
    returnValue: str = Field(default=None, description="返回值")
    costTime: int = Field(default=None, description="耗时")
